Integrand size = 21, antiderivative size = 200 \[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {x}{a^2}-\frac {a \left (4 a^2-5 b^2\right ) \text {arctanh}(\sin (c+d x))}{b^5 d}+\frac {2 (a-b)^{3/2} (a+b)^{3/2} \left (4 a^2+b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 b^5 d}+\frac {\left (a^2-b^2\right )^2 \sin (c+d x)}{a b^4 d (b+a \cos (c+d x))}+\frac {\left (3 a^2-2 b^2\right ) \tan (c+d x)}{b^4 d}-\frac {a \sec (c+d x) \tan (c+d x)}{b^3 d}+\frac {\tan ^3(c+d x)}{3 b^2 d} \]
-x/a^2-a*(4*a^2-5*b^2)*arctanh(sin(d*x+c))/b^5/d+2*(a-b)^(3/2)*(a+b)^(3/2) *(4*a^2+b^2)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a^2/b^5/d +(a^2-b^2)^2*sin(d*x+c)/a/b^4/d/(b+a*cos(d*x+c))+(3*a^2-2*b^2)*tan(d*x+c)/ b^4/d-a*sec(d*x+c)*tan(d*x+c)/b^3/d+1/3*tan(d*x+c)^3/b^2/d
Leaf count is larger than twice the leaf count of optimal. \(559\) vs. \(2(200)=400\).
Time = 6.18 (sec) , antiderivative size = 559, normalized size of antiderivative = 2.80 \[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {(b+a \cos (c+d x)) \sec ^2(c+d x) \left (-\frac {12 (c+d x) (b+a \cos (c+d x))}{a^2}-\frac {24 \left (a^2-b^2\right )^{3/2} \left (4 a^2+b^2\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right ) (b+a \cos (c+d x))}{a^2 b^5}+\frac {12 \left (4 a^3-5 a b^2\right ) (b+a \cos (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{b^5}+\frac {12 a \left (-4 a^2+5 b^2\right ) (b+a \cos (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{b^5}+\frac {(-6 a+b) (b+a \cos (c+d x))}{b^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {2 (b+a \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )}{b^2 \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {4 \left (9 a^2-7 b^2\right ) (b+a \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )}{b^4 \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {2 (b+a \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )}{b^2 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {(6 a-b) (b+a \cos (c+d x))}{b^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {4 \left (9 a^2-7 b^2\right ) (b+a \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )}{b^4 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {12 \left (a^2-b^2\right )^2 \sin (c+d x)}{a b^4}\right )}{12 d (a+b \sec (c+d x))^2} \]
((b + a*Cos[c + d*x])*Sec[c + d*x]^2*((-12*(c + d*x)*(b + a*Cos[c + d*x])) /a^2 - (24*(a^2 - b^2)^(3/2)*(4*a^2 + b^2)*ArcTanh[((-a + b)*Tan[(c + d*x) /2])/Sqrt[a^2 - b^2]]*(b + a*Cos[c + d*x]))/(a^2*b^5) + (12*(4*a^3 - 5*a*b ^2)*(b + a*Cos[c + d*x])*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]])/b^5 + ( 12*a*(-4*a^2 + 5*b^2)*(b + a*Cos[c + d*x])*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]])/b^5 + ((-6*a + b)*(b + a*Cos[c + d*x]))/(b^3*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2) + (2*(b + a*Cos[c + d*x])*Sin[(c + d*x)/2])/(b^2*(C os[(c + d*x)/2] - Sin[(c + d*x)/2])^3) + (4*(9*a^2 - 7*b^2)*(b + a*Cos[c + d*x])*Sin[(c + d*x)/2])/(b^4*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + (2* (b + a*Cos[c + d*x])*Sin[(c + d*x)/2])/(b^2*(Cos[(c + d*x)/2] + Sin[(c + d *x)/2])^3) + ((6*a - b)*(b + a*Cos[c + d*x]))/(b^3*(Cos[(c + d*x)/2] + Sin [(c + d*x)/2])^2) + (4*(9*a^2 - 7*b^2)*(b + a*Cos[c + d*x])*Sin[(c + d*x)/ 2])/(b^4*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])) + (12*(a^2 - b^2)^2*Sin[c + d*x])/(a*b^4)))/(12*d*(a + b*Sec[c + d*x])^2)
Time = 0.78 (sec) , antiderivative size = 283, normalized size of antiderivative = 1.42, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4386, 3042, 3376, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cot \left (c+d x+\frac {\pi }{2}\right )^6}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4386 |
\(\displaystyle \int \frac {\sin ^2(c+d x) \tan ^4(c+d x)}{(a \cos (c+d x)+b)^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos \left (c+d x+\frac {\pi }{2}\right )^6}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+b\right )^2}dx\) |
\(\Big \downarrow \) 3376 |
\(\displaystyle \int \left (\frac {2 \left (3 a b^2-2 a^3\right ) \sec (c+d x)}{b^5}+\frac {\left (a^2-b^2\right )^3}{a^2 b^4 (a \cos (c+d x)+b)^2}-\frac {3 \left (b^2-a^2\right ) \sec ^2(c+d x)}{b^4}-\frac {1}{a^2}+\frac {2 \left (2 a^6-3 a^4 b^2+b^6\right )}{a^2 b^5 (a \cos (c+d x)+b)}-\frac {2 a \sec ^3(c+d x)}{b^3}+\frac {\sec ^4(c+d x)}{b^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 (a-b)^{3/2} (a+b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 b^3 d}-\frac {2 a \left (2 a^2-3 b^2\right ) \text {arctanh}(\sin (c+d x))}{b^5 d}+\frac {4 (a-b)^{3/2} (a+b)^{3/2} \left (2 a^2+b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 b^5 d}+\frac {3 \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-b^2\right )^2 \sin (c+d x)}{a b^4 d (a \cos (c+d x)+b)}-\frac {x}{a^2}-\frac {a \text {arctanh}(\sin (c+d x))}{b^3 d}-\frac {a \tan (c+d x) \sec (c+d x)}{b^3 d}+\frac {\tan ^3(c+d x)}{3 b^2 d}+\frac {\tan (c+d x)}{b^2 d}\) |
-(x/a^2) - (a*ArcTanh[Sin[c + d*x]])/(b^3*d) - (2*a*(2*a^2 - 3*b^2)*ArcTan h[Sin[c + d*x]])/(b^5*d) - (2*(a - b)^(3/2)*(a + b)^(3/2)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^2*b^3*d) + (4*(a - b)^(3/2)*(a + b )^(3/2)*(2*a^2 + b^2)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]]) /(a^2*b^5*d) + ((a^2 - b^2)^2*Sin[c + d*x])/(a*b^4*d*(b + a*Cos[c + d*x])) + Tan[c + d*x]/(b^2*d) + (3*(a^2 - b^2)*Tan[c + d*x])/(b^4*d) - (a*Sec[c + d*x]*Tan[c + d*x])/(b^3*d) + Tan[c + d*x]^3/(3*b^2*d)
3.4.7.3.1 Defintions of rubi rules used
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(d*sin[ e + f*x])^n*(a + b*sin[e + f*x])^m*(1 - sin[e + f*x]^2)^(p/2), x], x] /; Fr eeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[m, 2*n, p/2] && ( LtQ[m, -1] || (EqQ[m, -1] && GtQ[p, 0]))
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Int[Cos[c + d*x]^m*((b + a*Sin[c + d*x])^n/Sin[c + d*x]^(m + n)), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[n] && IntegerQ[m] && (IntegerQ[m/2] || LeQ[m, 1])
Time = 2.08 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.82
method | result | size |
derivativedivides | \(\frac {-\frac {1}{3 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 a +b}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {3 a^{2}+a b -2 b^{2}}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \left (4 a^{2}-5 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5}}-\frac {2 \left (\frac {\left (a^{5} b -2 a^{3} b^{3}+a \,b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b}-\frac {\left (4 a^{6}-7 a^{4} b^{2}+2 a^{2} b^{4}+b^{6}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{5} a^{2}}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}-\frac {1}{3 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {-2 a -b}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3 a^{2}+a b -2 b^{2}}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {a \left (4 a^{2}-5 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5}}}{d}\) | \(365\) |
default | \(\frac {-\frac {1}{3 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 a +b}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {3 a^{2}+a b -2 b^{2}}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \left (4 a^{2}-5 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5}}-\frac {2 \left (\frac {\left (a^{5} b -2 a^{3} b^{3}+a \,b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b}-\frac {\left (4 a^{6}-7 a^{4} b^{2}+2 a^{2} b^{4}+b^{6}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{5} a^{2}}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}-\frac {1}{3 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {-2 a -b}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3 a^{2}+a b -2 b^{2}}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {a \left (4 a^{2}-5 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5}}}{d}\) | \(365\) |
risch | \(-\frac {x}{a^{2}}+\frac {2 i \left (6 a^{4} b \,{\mathrm e}^{7 i \left (d x +c \right )}-6 a^{2} b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+3 b^{5} {\mathrm e}^{7 i \left (d x +c \right )}+12 a^{5} {\mathrm e}^{6 i \left (d x +c \right )}-9 a^{3} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+3 a \,b^{4} {\mathrm e}^{6 i \left (d x +c \right )}+30 a^{4} b \,{\mathrm e}^{5 i \left (d x +c \right )}-36 a^{2} b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+9 b^{5} {\mathrm e}^{5 i \left (d x +c \right )}+36 a^{5} {\mathrm e}^{4 i \left (d x +c \right )}-39 a^{3} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+9 a \,b^{4} {\mathrm e}^{4 i \left (d x +c \right )}+42 a^{4} b \,{\mathrm e}^{3 i \left (d x +c \right )}-42 a^{2} b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+9 b^{5} {\mathrm e}^{3 i \left (d x +c \right )}+36 a^{5} {\mathrm e}^{2 i \left (d x +c \right )}-43 a^{3} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+9 a \,b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+18 a^{4} b \,{\mathrm e}^{i \left (d x +c \right )}-20 a^{2} b^{3} {\mathrm e}^{i \left (d x +c \right )}+3 b^{5} {\mathrm e}^{i \left (d x +c \right )}+12 a^{5}-13 a^{3} b^{2}+3 a \,b^{4}\right )}{3 d \,b^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} a^{2} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )}-\frac {4 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,b^{5}}+\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{b^{3} d}+\frac {4 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d \,b^{5}}-\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{b^{3} d}-\frac {4 \sqrt {a^{2}-b^{2}}\, a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \sqrt {a^{2}-b^{2}}-b}{a}\right )}{d \,b^{5}}+\frac {3 \sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \sqrt {a^{2}-b^{2}}-b}{a}\right )}{d \,b^{3}}+\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \sqrt {a^{2}-b^{2}}-b}{a}\right )}{d b \,a^{2}}+\frac {4 \sqrt {a^{2}-b^{2}}\, a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {b +i \sqrt {a^{2}-b^{2}}}{a}\right )}{d \,b^{5}}-\frac {3 \sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {b +i \sqrt {a^{2}-b^{2}}}{a}\right )}{d \,b^{3}}-\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {b +i \sqrt {a^{2}-b^{2}}}{a}\right )}{d b \,a^{2}}\) | \(814\) |
1/d*(-1/3/b^2/(tan(1/2*d*x+1/2*c)-1)^3-1/2*(2*a+b)/b^3/(tan(1/2*d*x+1/2*c) -1)^2-(3*a^2+a*b-2*b^2)/b^4/(tan(1/2*d*x+1/2*c)-1)+a*(4*a^2-5*b^2)/b^5*ln( tan(1/2*d*x+1/2*c)-1)-2/b^5/a^2*((a^5*b-2*a^3*b^3+a*b^5)*tan(1/2*d*x+1/2*c )/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)-(4*a^6-7*a^4*b^2+2*a ^2*b^4+b^6)/((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a +b))^(1/2)))-2/a^2*arctan(tan(1/2*d*x+1/2*c))-1/3/b^2/(tan(1/2*d*x+1/2*c)+ 1)^3-1/2*(-2*a-b)/b^3/(tan(1/2*d*x+1/2*c)+1)^2-(3*a^2+a*b-2*b^2)/b^4/(tan( 1/2*d*x+1/2*c)+1)-a*(4*a^2-5*b^2)/b^5*ln(tan(1/2*d*x+1/2*c)+1))
Leaf count of result is larger than twice the leaf count of optimal. 393 vs. \(2 (189) = 378\).
Time = 0.56 (sec) , antiderivative size = 843, normalized size of antiderivative = 4.22 \[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\left [-\frac {6 \, a b^{5} d x \cos \left (d x + c\right )^{4} + 6 \, b^{6} d x \cos \left (d x + c\right )^{3} + 3 \, {\left ({\left (4 \, a^{5} - 3 \, a^{3} b^{2} - a b^{4}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{4} b - 3 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) + 3 \, {\left ({\left (4 \, a^{6} - 5 \, a^{4} b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{5} b - 5 \, a^{3} b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (4 \, a^{6} - 5 \, a^{4} b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{5} b - 5 \, a^{3} b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, a^{3} b^{3} \cos \left (d x + c\right ) - a^{2} b^{4} - {\left (12 \, a^{5} b - 13 \, a^{3} b^{3} + 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{3} - {\left (6 \, a^{4} b^{2} - 7 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{3} b^{5} d \cos \left (d x + c\right )^{4} + a^{2} b^{6} d \cos \left (d x + c\right )^{3}\right )}}, -\frac {6 \, a b^{5} d x \cos \left (d x + c\right )^{4} + 6 \, b^{6} d x \cos \left (d x + c\right )^{3} - 6 \, {\left ({\left (4 \, a^{5} - 3 \, a^{3} b^{2} - a b^{4}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{4} b - 3 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) + 3 \, {\left ({\left (4 \, a^{6} - 5 \, a^{4} b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{5} b - 5 \, a^{3} b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (4 \, a^{6} - 5 \, a^{4} b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{5} b - 5 \, a^{3} b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, a^{3} b^{3} \cos \left (d x + c\right ) - a^{2} b^{4} - {\left (12 \, a^{5} b - 13 \, a^{3} b^{3} + 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{3} - {\left (6 \, a^{4} b^{2} - 7 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{3} b^{5} d \cos \left (d x + c\right )^{4} + a^{2} b^{6} d \cos \left (d x + c\right )^{3}\right )}}\right ] \]
[-1/6*(6*a*b^5*d*x*cos(d*x + c)^4 + 6*b^6*d*x*cos(d*x + c)^3 + 3*((4*a^5 - 3*a^3*b^2 - a*b^4)*cos(d*x + c)^4 + (4*a^4*b - 3*a^2*b^3 - b^5)*cos(d*x + c)^3)*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c )^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/( a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) + 3*((4*a^6 - 5*a^4*b^2)*c os(d*x + c)^4 + (4*a^5*b - 5*a^3*b^3)*cos(d*x + c)^3)*log(sin(d*x + c) + 1 ) - 3*((4*a^6 - 5*a^4*b^2)*cos(d*x + c)^4 + (4*a^5*b - 5*a^3*b^3)*cos(d*x + c)^3)*log(-sin(d*x + c) + 1) + 2*(2*a^3*b^3*cos(d*x + c) - a^2*b^4 - (12 *a^5*b - 13*a^3*b^3 + 3*a*b^5)*cos(d*x + c)^3 - (6*a^4*b^2 - 7*a^2*b^4)*co s(d*x + c)^2)*sin(d*x + c))/(a^3*b^5*d*cos(d*x + c)^4 + a^2*b^6*d*cos(d*x + c)^3), -1/6*(6*a*b^5*d*x*cos(d*x + c)^4 + 6*b^6*d*x*cos(d*x + c)^3 - 6*( (4*a^5 - 3*a^3*b^2 - a*b^4)*cos(d*x + c)^4 + (4*a^4*b - 3*a^2*b^3 - b^5)*c os(d*x + c)^3)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c))) + 3*((4*a^6 - 5*a^4*b^2)*cos(d*x + c)^4 + (4*a^5*b - 5*a^3*b^3)*cos(d*x + c)^3)*log(sin(d*x + c) + 1) - 3*((4*a^6 - 5*a^4*b^2)*cos(d*x + c)^4 + (4*a^5*b - 5*a^3*b^3)*cos(d*x + c)^3)*log(-sin (d*x + c) + 1) + 2*(2*a^3*b^3*cos(d*x + c) - a^2*b^4 - (12*a^5*b - 13*a^3* b^3 + 3*a*b^5)*cos(d*x + c)^3 - (6*a^4*b^2 - 7*a^2*b^4)*cos(d*x + c)^2)*si n(d*x + c))/(a^3*b^5*d*cos(d*x + c)^4 + a^2*b^6*d*cos(d*x + c)^3)]
\[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\int \frac {\tan ^{6}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{2}}\, dx \]
Exception generated. \[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 411 vs. \(2 (189) = 378\).
Time = 2.11 (sec) , antiderivative size = 411, normalized size of antiderivative = 2.06 \[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {\frac {3 \, {\left (d x + c\right )}}{a^{2}} + \frac {3 \, {\left (4 \, a^{3} - 5 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{5}} - \frac {3 \, {\left (4 \, a^{3} - 5 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{5}} + \frac {6 \, {\left (a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )} a b^{4}} - \frac {6 \, {\left (4 \, a^{6} - 7 \, a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} a^{2} b^{5}} + \frac {2 \, {\left (9 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 18 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 16 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} b^{4}}}{3 \, d} \]
-1/3*(3*(d*x + c)/a^2 + 3*(4*a^3 - 5*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/b^5 - 3*(4*a^3 - 5*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^5 + 6* (a^4*tan(1/2*d*x + 1/2*c) - 2*a^2*b^2*tan(1/2*d*x + 1/2*c) + b^4*tan(1/2*d *x + 1/2*c))/((a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b )*a*b^4) - 6*(4*a^6 - 7*a^4*b^2 + 2*a^2*b^4 + b^6)*(pi*floor(1/2*(d*x + c) /pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d *x + 1/2*c))/sqrt(-a^2 + b^2)))/(sqrt(-a^2 + b^2)*a^2*b^5) + 2*(9*a^2*tan( 1/2*d*x + 1/2*c)^5 + 3*a*b*tan(1/2*d*x + 1/2*c)^5 - 6*b^2*tan(1/2*d*x + 1/ 2*c)^5 - 18*a^2*tan(1/2*d*x + 1/2*c)^3 + 16*b^2*tan(1/2*d*x + 1/2*c)^3 + 9 *a^2*tan(1/2*d*x + 1/2*c) - 3*a*b*tan(1/2*d*x + 1/2*c) - 6*b^2*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*b^4))/d
Time = 17.23 (sec) , antiderivative size = 9452, normalized size of antiderivative = 47.26 \[ \int \frac {\tan ^6(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\text {Too large to display} \]
((2*tan(c/2 + (d*x)/2)^5*(10*a*b^3 - 6*a^3*b + 36*a^4 + 9*b^4 - 37*a^2*b^2 ))/(3*a*b^4) - (2*tan(c/2 + (d*x)/2)^3*(6*a^3*b - 10*a*b^3 + 36*a^4 + 9*b^ 4 - 37*a^2*b^2))/(3*a*b^4) + (2*tan(c/2 + (d*x)/2)*(2*a^3*b - 2*a*b^3 + 4* a^4 + b^4 - 5*a^2*b^2))/(a*b^4) + (2*tan(c/2 + (d*x)/2)^7*(a - b)*(3*a*b^2 - 2*a^2*b - 4*a^3 + b^3))/(a*b^4))/(d*(a + b + tan(c/2 + (d*x)/2)^8*(a - b) - tan(c/2 + (d*x)/2)^2*(4*a + 2*b) - tan(c/2 + (d*x)/2)^6*(4*a - 2*b) + 6*a*tan(c/2 + (d*x)/2)^4)) - (2*atan((((((((((8192*(9*a^5*b^21 - 3*a^4*b^ 22 - 13*a^6*b^20 + 6*a^7*b^19 + 25*a^8*b^18 - 41*a^9*b^17 + 3*a^10*b^16 + 26*a^11*b^15 - 12*a^12*b^14))/(a^3*b^16) - (tan(c/2 + (d*x)/2)*(2*a^6*b^23 - 6*a^7*b^22 + 8*a^8*b^21 - 8*a^9*b^20 + 6*a^10*b^19 - 2*a^11*b^18)*8192i )/(a^6*b^16))*1i)/a^2 - (8192*tan(c/2 + (d*x)/2)*(2*a^2*b^23 - 6*a^3*b^22 + 12*a^4*b^21 - 12*a^5*b^20 - 8*a^6*b^19 + 12*a^7*b^18 - 60*a^8*b^17 + 160 *a^9*b^16 - 60*a^10*b^15 - 100*a^11*b^14 + 82*a^12*b^13 - 118*a^13*b^12 + 128*a^14*b^11 + 32*a^15*b^10 - 96*a^16*b^9 + 32*a^17*b^8))/(a^4*b^16))*1i) /a^2 + (8192*(4*a*b^21 - 3*b^22 - 8*a^2*b^20 + 16*a^3*b^19 + 20*a^4*b^18 - 26*a^5*b^17 + 74*a^6*b^16 - 280*a^7*b^15 + 192*a^8*b^14 + 332*a^9*b^13 - 1088*a^10*b^12 + 1040*a^11*b^11 + 1129*a^12*b^10 - 2366*a^13*b^9 + 20*a^14 *b^8 + 1696*a^15*b^7 - 528*a^16*b^6 - 416*a^17*b^5 + 192*a^18*b^4))/(a^3*b ^16))*1i)/a^2 - (8192*tan(c/2 + (d*x)/2)*(a*b^20 - 256*a^20*b + 256*a^21 - b^21 - 4*a^2*b^19 + 4*a^3*b^18 - 40*a^4*b^17 + 140*a^5*b^16 - 250*a^6*...